//
//  UserOrderListCell.m
//  BaseProject
//
//  Created by 王洋 on 2020/7/29.
//  Copyright © 2020 王洋. All rights reserved.
//

#import "UserOrderListCell.h"

@implementation UserOrderListCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)fillCellWithModel:(CommonUserOrderModel *)model {
    
    self.catNameLab.text = model.className;
    self.timeLab.text = model.createTime;
    
    
    NSString *uoTypeString = @"";
    
    switch (model.uosType) {
        case 1:{
            uoTypeString = @"定金";
        } break;
        case 2:{
            uoTypeString = @"尾款";
        } break;
        case 3:{
            uoTypeString = @"全款";
        } break;
        default:
            break;
    }    
    
    self.dingjinLab.text =[NSString stringWithFormat:@"%@支付：%@",uoTypeString,[Utilities changeDoubleToString:model.uosPayAmount]];
    
    self.yongjinLab.text =[NSString stringWithFormat:@"应得佣金：%@",[Utilities changeDoubleToString:model.scfAmount]];
    
    
    switch (model.uoStatus) {
        case 1:{
            self.dingjinStatusLab.text = @"已支付";
        } break;
        case 2:{
            self.dingjinStatusLab.text = @"未支付";
        } break;
        default:
            break;
    }

    switch (model.scfStatus) {
        case 1:{
            self.yongjinStatus.text = @"冻结";
        } break;
        case 2:{
            self.yongjinStatus.text = @"正常";
        } break;
        case 3:{
            self.yongjinStatus.text = @"退款";
        } break;
        default:{
            self.yongjinStatus.text = @"";
        } break;
    }
}

@end
